export default (pArr, cArr) => {
  let p = []
  pArr && pArr.forEach(item => {
    p['P' + item.setId] = item
    p['P' + item.setId].children = []
  })
  cArr && cArr.forEach(item => {
    if (p['P' + item.permissionSetId]) {
      p['P' + item.permissionSetId].children.push(item)
    }
  })
  return forUtil(p)
}
function forUtil (arr) {
  let res = []
  for (let i in arr) {
    res.push(arr[i])
  }
  return res
}
